/**菜单接口封装模块 */
import axios from "../utils/request";

// 获取菜单列表
export const getMenuList = () => axios({
    url: "/api/menulist?istree=1",
    method: "GET"
})
//  新增菜单
export const addMenuList = (menuList, controller) => axios({
    url: "/api/menuadd",
    method: "post",
    data: menuList,
    controller
})
//  编辑菜单
export const editMenuList = (menuList, controller) => axios({
    url: "/api/menuedit",
    method: "post",
    data: menuList,
    controller
})
//  删除菜单
export const delMenuList = (id, controller) => axios({
    url: "/api/menudelete",
    method: "post",
    data: {
        id,
    },
    controller
})